﻿
@{
    ViewBag.Title = "UserRoleEdit";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}
@section css{
    <link href="~/Assets/css/lib/fileinput.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/bootstrap-select.css" rel="stylesheet" />
}

<header id="topbar">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a>添加用户</a>
            </li>
            <li class="crumb-trail">用户管理</li>
        </ol>
    </div>
</header>

<div id="content" ng-cloak ng-controller="SystemConfigController" ng-init="page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
      PageLoading = false;
    LoadingMsg='加载中,请稍后...';
     BindDepartmentList('Dep_Select');
     AddModel={};
     AddModel.DepartmentId='0';
     AddModel.IsEmployee=1">
    <div class="load" ng-show="PageLoading">
        <div class="loader">
            <svg version="1.1" id="loader-1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
            <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite" />
			</path>
		</svg>
            <div class="load-msg" ng-bind="LoadingMsg"></div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-info panel-border top mb35">
                <div class="panel-heading">
                    <span class="panel-title">添加用户</span>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal row-border">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">工号</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" ng-model="AddModel.UserNo">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">姓名</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" ng-model="AddModel.UserName">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">部门</label>
                            <div class="col-sm-8">
                                <select id="Dep_Select" class="selectpicker show-tick form-control" ng-model="AddModel.DepartmentId" data-live-search="true">
                                    <option value="0">请选择部门</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">邮箱</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" ng-model="AddModel.Email">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">联系方式</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" ng-model="AddModel.Phone">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">公司员工</label>
                            <div class="col-sm-2">
                                <label style="margin-left:10px;margin-top:10px;" ng-click="AddModel.IsEmployee=1">
                                    <input type="radio" name="IsEmployee" value="1" checked>是
                                </label>
                                <label style="margin-left:10px;margin-top:10px;" ng-click="AddModel.IsEmployee=0">
                                    <input type="radio" name="IsEmployee" value="0">否
                                </label>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="panel-footer">
                    <button class="btn-primary btn" ng-click="AddUser(AddModel,page);">保存</button>
                    <a href="UserPageList?page={{page}}" class="btn-default btn">取消</a>
                </div>
            </div>
        </div>
    </div>
</div>

@section Js{
    <script src="~/Bussiness/js/libs/upload.js"></script>
    <script src="~/Bussiness/js/pg/Organization.js?v=@DateTime.Now.ToString("yyMMddHHmm")"></script>
    <script src="~/Bussiness/js/libs/moment.min.js"></script>
    <script src="~/Bussiness/js/libs/locales/date/zh-cn.js"></script>
    <script src="~/Bussiness/js/libs/bootstrap-datetimepicker.min.js"></script>
    <script src="~/Bussiness/js/libs/angularjs-datepicker.js"></script>
    <script src="~/Bussiness/js/libs/fileinput.js"></script>
    <script src="~/Bussiness/js/libs/zh.js"></script>
    <script>
        $('#docfiles').fileinput({
            language: 'zh',
            allowedFileExtensions: ['xls', 'xlsx']
        });
    </script>
}
